﻿using System.Collections.Generic;
using cludg.Services.Security.Permissions;
using cludg.Domain.Users;

namespace cludg.Web.Permissions
{
	public class AccountPermisionProviders : IPermissionProvider
	{
		protected readonly List<Permission> Permissions = new List<Permission>();

		public AccountPermisionProviders()
			: base()
		{
			Permissions.Add(new RoleBasedPermission { Caption = "Редактировать аккаунт", Name = "EditAccount", Roles = Roles.NotAnonymouse});
			Permissions.Add(new RoleBasedPermission { Caption = "Просмотр профиля", Name = "ViewProfile", Roles = Roles.All });
		}

		public IEnumerable<Permission> GetPermissions()
		{
			return Permissions;
		}
	}
}